﻿<!-- 左侧固定导航栏 -->
<template>
<!--  <div class="leftlistBox">-->
<!--    <section>-->
<!--      <div class="r1-head">-->
<!--        <img-->
<!--          :src="-->
<!--            this.$store.state.themeObj.center_smailimg-->
<!--              ? this.$store.state.themeObj.center_smailimg-->
<!--              : 'static/img/img01.jpg'-->
<!--          "-->
<!--        />-->
<!--        <h1 style="text-align: center;" v-if="this.$store.state.themeObj.user_start != 0">-->
<!--          <span>Zlwblog</span>-->
<!--          <p>不断完善。</p>-->
<!--          <p class="phover" style="display:inline-block;color: rgb(53,96,143)!important;font-size: 20px;">-->
<!--            <span>-->
<!--            {{ articleData.totalArticleNum }}<br>-->
<!--              <b style="font-weight: normal;font-size: 15px">文章</b>-->
<!--              </span>-->
<!--          </p>-->
<!--          <p class="phover"-->
<!--             style="margin-top:20px;display:inline-block;color: rgb(53,96,143)!important;font-size: 20px">-->
<!--            <span>-->
<!--            {{ articleData.totalTagNum }}<br>-->
<!--               <b style="font-weight: normal;font-size: 15px">标签</b>-->
<!--              </span>-->
<!--          </p>-->
<!--          <p class="phover"-->
<!--             style="margin-top:20px;display:inline-block;color: rgb(53,96,143)!important;font-size: 20px">-->
<!--            <span>-->
<!--            {{ articleData.totalViewCount }}<br>-->
<!--               <b style="font-weight: normal;font-size: 15px">浏览</b>-->
<!--              </span>-->
<!--          </p>-->
<!--        </h1>-->
<!--      </div>-->

<!--      <div class="r1-body">-->
<!--        &nbsp;<a class="button&#45;&#45;animated" id="card-info-btn" target="_blank" rel="noopener"-->
<!--                 href="https://space.bilibili.com/523777468"><img align="center"-->
<!--                                                                     src="https://www.bilibili.com/favicon.ico?v=1"-->
<!--                                                                     width="15px" height="15px"/><span-->
<!--        style="font-size: 10px;"> Follow Me</span></a>-->
<!--      </div>-->

<!--    </section>-->

<!--    &lt;!&ndash; 右侧上滑小图片 &ndash;&gt;-->
<!--    <div-->
<!--      v-if="this.$store.state.themeObj.user_start != 0"-->
<!--      :class="gotoTop ? 'toTop hidden' : 'toTop goTop hidden'"-->
<!--      @click="toTopfun"-->
<!--    >-->
<!--      <img-->
<!--        :src="-->
<!--          this.$store.state.themeObj.right_img-->
<!--            ? this.$store.state.themeObj.right_img-->
<!--            : 'static/img/long.png'-->
<!--        "-->
<!--        alt=""-->
<!--      />-->
<!--    </div>-->
<!--    <div-->
<!--      v-else-->
<!--      :class="gotoTop ? 'toTophui hidden' : 'toTophui goTophui hidden'"-->
<!--      @click="toTopfun"-->
<!--    >-->
<!--      <img-->
<!--        :src="-->
<!--          this.$store.state.themeObj.right_img-->
<!--            ? this.$store.state.themeObj.right_img-->
<!--            : 'static/img/long.png'-->
<!--        "-->
<!--        alt=""-->
<!--      />-->
<!--    </div>-->
<!--  </div>-->
</template>


<script>
import {articleData, hotArticleList} from "../api/article";

export default {
  data() {
    //选项 / 数据
    return {
      total: 0,
      fixDo: false,
      loveme: false,
      gotoTop: false, //返回顶部
      going: false, //是否正在执行上滑动作
      browseList: "", //热门文章 浏览量最多
      artCommentList: "", //最新评论
      articleData: {//文章数据
        totalArticleNum: null,
        totalViewCount: null,
        totalTagNum: null
      },
    };
  },
  methods: {
    //事件处理器
    toTopfun: function (e) {
      var that = this;
      this.gotoTop = false;
      this.going = true;
      var timer = setInterval(function () {
        //获取滚动条距离顶部高度
        var osTop =
          document.documentElement.scrollTop || document.body.scrollTop;
        var ispeed = Math.floor(-osTop / 7);
        document.documentElement.scrollTop = document.body.scrollTop =
          osTop + ispeed;
        //到达顶部，清除定时器
        if (osTop == 0) {
          that.going = false;
          clearInterval(timer);
          timer = null;
        }
      }, 30);
    },
    // getHotArticleList() {
    //   hotArticleList().then((response) => {
    //     this.browseList = response;
    //   });
    // },
    getArticleData() {
      articleData().then((response) => {
        this.articleData = response;
      });
    }
  },
  components: {
    //定义组件
  },

  created() {
    //生命周期函数
    var that = this;
    window.onscroll = function () {
      var t = document.documentElement.scrollTop || document.body.scrollTop;
      // console.log(t);
      if (!that.going) {
        if (t > 600) {
          that.gotoTop = true;
        } else {
          that.gotoTop = false;
        }
      }
      if (t > 1200) {
        that.fixDo = true;
      } else {
        that.fixDo = false;
      }
    };
    //查询浏览量最多的10篇文章数据
    // this.getHotArticleList();

    this.getArticleData();
  },
};
</script>

<style lang="less">

#card-info-btn {
  display: block;
  margin-top: 0.7rem;
  background-color: rgb(73, 177, 245);
  color: #fff;
  text-align: center;
  line-height: 2.4;
}

#card-info-btn:hover {
  background-image: linear-gradient(to right, #ffbf00, #eb1e23); /*按钮颜色从左到右渐变*/
  transition: background-position 2s ease-in-out;
}

#card-info-btn:hover:before,
#card-info-btn:hover:after {
  background-image: none; /*去除按钮伪元素的渐变背景*/
}

a, img {
  cursor: url(https://cdn.jsdelivr.net/gh/sviptzk/HexoStaticFile@latest/Hexo/img/pointer.cur), pointer;
}

.leftlistBox {
  position: relative;
}

.leftlistBox section {
  transition: all 0.2s linear;
  position: relative;
  background: #fff;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
}

.leftlistBox section:hover {
  transform: translate(0, -2px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.leftlistBox .r1-head {
  float: left;
  left: 20px;
  border-radius: 4px 4px 0 0;

  position: relative;
  /*box-shadow: inset 0 -70px 100px -50px rgba(0,0,0,.5);*/
}

.leftlistBox .r1-head img {

  width: 40%;

  min-height: 120px;

}

.phover {
  color: rgb(62, 159, 159) !important;
  padding-left: 15px;
}

.r1-head h1 .phover:hover {
  cursor: url(https://cdn.jsdelivr.net/gh/sviptzk/HexoStaticFile@latest/Hexo/img/pointer.cur), pointer;
  color: rgb(250, 219, 175) !important;
  font-size: 30px;
}

.leftlistBox .r1-head h1 {
  position: absolute;
  bottom: -20px;
  margin: 10px 0 10px -100px;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: black;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7);
  //font-weight: 700;
  width: 200px;
  left: 63%;
  line-height: 30px;
}

.leftlistBox .r1-head h1 span {
  //opacity: 0.3;
}

.leftlistBox .r1-head h1 p {
  //opacity: 0.3;

  font-size: 15px;
  color: rgb(144, 147, 153) !important;
  text-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
}

.leftlistBox .r1-body p {
  font-size: 14px;
  margin: 5px 20px 8px 0;
  font-weight: 700;
  text-align: center;
}

.leftlistBox .r1-body .catch-me {
  text-align: center;
}

.leftlistBox .r1-body .catch-me a {
  display: inline-block;
  margin-bottom: 7px;
  position: relative;
  text-decoration: none;
}

.leftlistBox .r1-body .catch-me a:hover i {
  color: #fff;
  background: #f4692c;
}

.leftlistBox .r1-body .catch-me a i {
  display: inline-block;
  font-size: 18px;
  width: 42px;
  height: 42px;
  line-height: 42px;
  border-radius: 42px;
  color: rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  font-style: normal;
  margin: 0 3.2px;
}

/*************do you like me*******************/
.leftlistBox .rs2 {
  /*padding:10px 0 4px 0;*/
  min-height: 100px;
}

.leftlistBox .rs2.fixed {
  position: fixed;
  top: 40px;
  width: 22%;
}

.leftlistBox .rs2 p {
  color: #df2050;
  cursor: url(https://cdn.jsdelivr.net/gh/sviptzk/HexoStaticFile@latest/Hexo/img/pointer.cur), pointer;
  font-size: 20px;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
}

.leftlistBox .rs2 div {
  color: #df2050;
  cursor: url(https://cdn.jsdelivr.net/gh/sviptzk/HexoStaticFile@latest/Hexo/img/pointer.cur), pointer;
  text-align: center;
  font-size: 40px;
  position: absolute;
  width: 100%;
  height: 100px;
  line-height: 100px;
  left: 0;
  top: 30px;
}

.leftlistBox .rs2 div i.heart {
  display: inline-block;
  text-align: center;
  width: 100px;
  height: 100px;
  margin-left: -20px;
  margin-top: -5px;
  background: url(../../static/img/heart.png) no-repeat;
  background-position: 0 0;
  cursor: url(https://cdn.jsdelivr.net/gh/sviptzk/HexoStaticFile@latest/Hexo/img/pointer.cur), pointer;
  -webkit-transition: background-position 1s steps(28);
  transition: background-position 1s steps(28);
  -webkit-transition-duration: 0s;
  transition-duration: 0s;
  vertical-align: middle;
}

.leftlistBox .rs2 div i.heart:hover {
  transform: scale(1.15);
  -webkit-transform: scale(1.15);
}

.leftlistBox .rs2 div i.heart.active {
  -webkit-transition-duration: 1s;
  transition-duration: 1s;
  background-position: -2800px 0;
}

.leftlistBox .rs2 div span {
  margin-left: -30px;
}

/**********排队来说*************/
.leftlistBox .rs3 .rs3-item {
  font-size: 13px;
  line-height: 20px;
}

.leftlistBox .rs3 .rs3-item a {
  display: block;
  padding: 5px;
  transition: all 0.3s ease-out;
  border-bottom: 1px solid #ddd;
  margin: 5px 0;
}

.leftlistBox .rs3 .rs3-item a:hover {
  background: rgba(230, 244, 250, 0.5);
  border-radius: 5px;
}

.leftlistBox .rs3 .rs3-photo {
  float: left;
}

.leftlistBox .rs3 .rs3-photo img {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.leftlistBox .rs3 .rs3-inner {
  margin-left: 40px;
}

.leftlistBox .rs3 .rs3-inner .rs3-author {
  font-weight: 700;
}

.leftlistBox .rs3 .rs3-inner .rs3-text {
  font-size: 12px;
  text-align: justify;
}

.leftlistBox .rs3 .rs3-item:last-child a {
  border-bottom: none;
}

/************排队看这些***************/
.leftlistBox .rs4 li {
  padding: 8px 0;
  text-align: justify;
}

.leftlistBox .rs4 li a {
  font-weight: 600;
}

.leftlistBox .rs4 li a:hover {
  color: #64609e;
}

/*回到顶部*/
/*返回到顶部*/
.toTop {
  position: fixed;
  right: 40px;
  top: -150px;
  z-index: 99;
  width: 70px;
  height: 900px;
  transition: all 0.5s 0.3s ease-in-out;
  cursor: url(https://cdn.jsdelivr.net/gh/sviptzk/HexoStaticFile@latest/Hexo/img/pointer.cur), pointer;
}

.goTop {
  top: -950px;
}

.toTop img,
.toTophui img {
  width: 100%;
  height: auto;
}

.toTophui {
  position: fixed;
  right: 10px;
  bottom: 80px;
  z-index: 99;
  width: 120px;
  height: 120px;
  transition: all 0.5s 0.3s ease-in-out;
  cursor: url(https://cdn.jsdelivr.net/gh/sviptzk/HexoStaticFile@latest/Hexo/img/pointer.cur), pointer;
  animation: toflow 2s ease-in-out infinite;
}

@keyframes toflow {
  0% {
    /*top:400px;*/
    transform: scale(0.95) translate(0, 10px);
  }
  50% {
    /*top:410px;*/
    transform: scale(1) translate(0, 0px);
  }
  100% {
    /*top:400px;*/
    transform: scale(0.95) translate(0, 10px);
  }
}

.goTophui {
  bottom: 120vh;
}
</style>
